home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
striprng.cc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1987-09-26
|
336 b
|
15 lines
striprange(char *str,char clo,char chi)
/* This will strip all occurances of the characters that fall between
char clo and chi out of the string pointed to by *str.
*/
{
char *newstr;
newstr = str;
while (*str) {
if ((*str > chi) | (*str < clo))
*newstr++ = *str;
str++; }
*newstr = '\0';
}